<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加分类|<{$configcache['Title']}></title>
<link rel="stylesheet" type="text/css" href="__CSS__/content.css"  />
<link rel="stylesheet" type="text/css" href="__CSS__/public.css"  />
<script type="text/javascript" src="__JS__/jquery.js"></script>
<script type="text/javascript" src="__JS__/Public.js"></script>
<script type="text/javascript" src="__JS__/winpop.js"></script>
<script type="text/javascript" src="__JS__/check.js"></script>
<script>
$(document).ready(function() {
	var $dldd = $('#dl dd');
	$('.button').click(function() {
		var 
			classname=$dldd.find('.qtext').eq(0).val(),
			description=$('#dl dd .textarea').val();
			
		if (!tcheck(classname,'','请填写分类名称')) { return false; }
		if (!tcheck(classname,'2,20','分类名称请在20个字符以内','length')) { return false; }
		if (!tcheck(description,'0,30','描述请在30个字符以内','length')) { return false; }
		
		wintq('正在添加，请稍后...',4,20000,0,'');
		$.ajax({
			url:'__APP__/News/classadd_do/',
			dataType:'json',
			type:'POST',
			data:'classname='+classname+'&description='+description,
			success: function(data) {
				if (data.s=='ok') {
					wintq('添加成功',1,1500,0,'__APP__/News/classadd/');
				}else {
					wintq(data.s,3,1500,1,'');
				}
			}
		});
	});
});
</script>
</head>
<body>
<div id="content">
	<dl id="dl">
    	<dt>添加分类</dt>
        <dd>
        	<span class="dd_left">分类名称：</span>
        	<span class="dd_right"><input type="text" name="classname" class="qtext" /><font>* 输入如：联系我们</font></span>
        </dd>
        <dd>
        	<span class="dd_left">分类描述：</span>
            <span class="dd_right"><textarea name="description" class="textarea"></textarea></span>
        </dd>
        <dd><input type="button" class="button" value="提 交" /></dd>
    </dl>
</div>
</body>
</html>
